home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-10-26 | 2.5 KB | 98 lines | [TEXT/GEOL] |
- Item forwarded by BURBECK.S to ALCABES
-
- Item 3146942 26-Oct-89 14:23
-
- From: SHEBANOW1 Shebanow, Andrew
-
- To: MACAPP.TECH$ MACAPP Tech
-
- Sub: MacApp/C++ Release Notes II
-
- As most of you already know, there are some problems with the MacApp 2.0b9 C++
- Headers that were shipped with MPW 3.1b1 C++. This document will be sent to all
- MPW C++ customers, but I though you all would appreciate a look at it early.
-
- Andy Shebanow
- MacDTS
-
- ----------------------------------------------------------------------
- Release Notes for the MacApp 2.0b9 C++ Headers - The Sequel
- October 20, 1989
-
- Due to an unfortunate oversight, there are some problems
- with the MacApp 2.0b9 C++ Headers - must have been the
- earthquake.
-
- Types.h Problem
-
- The MacApp 2.0b9 C++ Headers distributed with MPW C++ 3.1b1
- depend on the Types.h file from the as-yet-unreleased MPW
- 3.1. Fortunately, you can fix this by adding the following
- lines to the Types.h included with MPW 3.0:
-
- enum {v,h};
- typedef unsigned char VHSelect;
-
- typedef unsigned char Byte;
- typedef char SignedByte;
-
- You should also replace the definition of the Length macro with:
-
- #ifdef __cplusplus
- inline int Length(const StringPtr string) { return (*string); };
- #else
- #define Length(string) (*(unsigned char *)(string))
- #endif
-
- Your MacApp/C++ programs will now compile much more happily.
-
- Speedup Hints
-
- Your MacApp/C++ compiles will be a lot faster if you use a
- global file to include all of your source files. About
- 80-90% of a typical compile is spent reading the MacApp
- header files, so reading them once for all source files
- instead of once for each source file is a big win. Your
- global file would look something like this:
-
- // All.cp
-
- #include "MMyProgram.cp"
- #include "UMyProgram.cp"
- #include "UUtilities.cp"
-
- In your individual source files, bracket your MacApp
- includes so that they don't get read more than once:
-
- // UUtilities.cp
-
- #ifndef __UMacApp__
- #include <UMacApp.h>
- #endif __UMacApp__
-
- #ifndef __UMacAppUtilities__
- #include <UMacAppUtilities.h>
- #endif __UMacAppUtilities__
-
- #ifndef __UUtilities__
- #include "UUtilities.h"
- #endif __UUtilities__
-
- // code....
-
- Of course, you also need to put bracketing into your local
- include files so that things don't go haywire if you do
- include the same file twice:
-
- // UUtilities.h
-
- #ifndef __UUtilities__
- #define __UUtilities__ 1
-
- // definitions
-
- #endif __UUtilities__
-
- ----------------------------------------------------------------------
-
-